package alkaid.eis.sys.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import org.springframework.beans.BeanUtils;

import alkaid.eis.sys.core.AbstractBaseEntity;
import lombok.Getter;
import lombok.Setter;

/**
 * 设置项
 * 
 * @author Lucky Yang
 * @since 0.0.1
 */
@Entity
@Getter
@Setter
@Table(name = "eis_sys_option")
public class Option extends AbstractBaseEntity {
    /**
     * 代码
     */
    @Column(nullable = false, unique = true)
    private String code;

    /**
     * 描述
     */
    private String description;

    public Option() {
    }

    public Option(String code) {
        this.code = code;
    }

    public void copy(Area source) {
        BeanUtils.copyProperties(source, this, "id");
    }
}
